<%@ Page Language="C#" EnableViewState="false" ValidateRequest="false" AutoEventWireup="true" 
	MasterPageFile="~/App_ThemeMasters/NoStyle/OneColumnLayout.Master" Inherits="Syrinx.Gui.AspNet.Ajax.NitobiBasePage" EnableEventValidation="false" %>
<%@ Register Assembly="Swaf.Gui.AspNet2" Namespace="Swaf.Gui.AspNet2" TagPrefix="swf" %>
<%@ Register Assembly="ScsAspNet" Namespace="Syrinx.Gui.AspNet.Ajax" TagPrefix="saj" %><%@ Register Assembly="NitobiControls" Namespace="Nitobi" TagPrefix="ntb" %>

<!--#include file="~/SiteControls/RegisterStandardControls.txt"-->
<!--#include file="../SiteControls/StandardHeaderPageContent.inc"-->
<!--#include file="../SiteControls/StandardFooterPageContent.inc"-->

<script runat="server">
	public string TitleFormat = "$forum.title$ - $glgo.title$";
</script>


<asp:Content ID="c1" ContentPlaceHolderID="title" runat="server">
<swf:BizProc runat="server" ID="forum" FactoryName="Forums" >
	<State includeSelf="true" entireTree="false" listDetailLevel="idAndTitle" isPaging="true" details="idAndTitle" EditModeSessionKey="NeverEdit" />
</swf:BizProc>
<swf:BizProc runat="server" ID="threads" FactoryName="Forums">
	<State includeSelf="false" orderBy="lastChildUpdated" UseDarNamed="DA.Articles.GetArticlesForumThreads"  sortDir="DESC" includeCounts="true" isPaging="true" entireTree="false" incrementCounts="false" listDetailLevel="basicDetails" EditModeSessionKey="ForumEdit" />
	<ParentBizProc id="forum" fieldName="id" dataId="pid" />
	<ParentBizProc id="forum" dataId="parent" />
</swf:BizProc>
	<swf:BizProc runat="server" id="t" FactoryName="articleTrail">
		<ParentBizProc id="forum" fieldName="id" dataId="pid" />
		<State hideLast="true" />
	</swf:BizProc>
	<%--
	<swf:BizProc runat="server" ID="captcha" FactoryName="captchaVerify">
		<ParentBizProc id="loginBP" />
		<ParentBizProc id="threads" dataId="pid" />
		<State usage="canedit" />
	</swf:BizProc>
	 --%>
	<h1>
	<art:ArticleTranslationDisplay runat="server" ID="f3"
		ParentBizProcIds="forum" ReadOnlyTemplate="Articles.Gui.AspNet.ArticleRODisplay-TitleOnly" />
	</h1>
</asp:Content>

<asp:Content runat="server" ID="c6" ContentPlaceHolderID="trails">
	<saj:ComplexBizObjListDisplay runat="server" ID="ArticleParentTrail1" 
		ParentBizProcIds="t" CssClass="ContentTrail"
		ReadOnlyTemplate="Articles.Gui.AspNet.ArticleParentTrail-Simple">
		<macros partTitle="$title$"  navLink0="$CmpSetting(sitePath)$/std/$root$.aspx"
			navLink1="$CmpSetting(sitePath)$/std/$root$.aspx" />
	</saj:ComplexBizObjListDisplay>
</asp:Content>

<asp:Content runat="server" ID="c8" ContentPlaceHolderID="pagingArea">
<saj:NitobiPaginationDisplay ID="tpager" runat="server" ParentBizProcIds="threads" SkinID="Forum" />
</asp:Content>

<asp:Content runat="server" ID="c7" ContentPlaceHolderID="mainButtonArea">
<span class="button1"><saj:ActionButton runat="server" ID="_pst1" Actions="threads.AddBizObj" Text="New Topic" /></span>
<span class="button6"><saj:ActionButton runat="server" ID="_pst2" Actions="threads.UpdateBizObj" Text="Submit Changes" /></span>
<span class="button1"><saj:ActionButton runat="server" ID="_pst3" Actions="threads.CancelEdits" Text="Cancel" /></span>
<span class="button5"><saj:ActionButton runat="server" ID="_pst4" Actions="threads.DeleteBizObj" Text="Delete" ClientClick="if(!confirm('Are you sure you want to delete?'))return false;"/></span>
<span class="button4"><saj:ActionButton runat="server" ID="_pst6" Actions="threads.SwitchEdit" Text="Edit" SessionBoolSwitch="ForumEdit"  /></span>
</asp:Content>


<asp:Content ID="c0" runat="server" ContentPlaceHolderID="mainContent">
<art:ArticleTranslationDisplay runat="server" ID="f2"
	ParentBizProcIds="threads" 
	TranslationTemplate="Articles.Gui.AspNet.ArticleTranslationRWDisplay"
	ReadOnlyTemplate=""
	EditableTemplate="Forums.Gui.AspNet.ForumPostRWDisplay-Style1" >
	<macros imageRes="Thumbnail" />
</art:ArticleTranslationDisplay>

<%--
<saj:NitobiBizObjDisplay runat="server" ID="cap1" ParentBizProcIds="captcha"
	ReadOnlyTemplate=""
	EditableTemplate="Syrinx.Gui.AspNet.CaptchaDisplay" />
 --%>	


<div style="width:98%">
<swf:DivLayers runat="server" ID="dl2" NumLayers="4" CssClass="ForumGrpBkg">
	<saj:ComplexBizObjListDisplay ID="f1" runat="server" ParentBizProcIds="threads" MaxElements="25"
		ReadOnlyTemplate="Forums.Gui.AspNet.ForumROListDisplay-Style1"
		EditableTemplate="Forums.Gui.AspNet.ForumListDisplay-Style1">
		<macros imageRes="SmallThumbnail" 
		navLink="javascript:if(document.getElementById('ctl00_mainContent_f2_baseTitle') == null)window.location.href='$CmpSetting(sitePath)$/std/ForumThread.aspx?threadpid=$uniqueId$&amp;troot=$_troot$';else $_bizProcId$BizProc.triggerEvent('$_controlId$','bizObjSelected','$id$');"
		readOnlyForumNavLink="$CmpSetting(sitePath)$/std/ForumThread.aspx?threadpid=$uniqueId$&amp;troot=$_troot$" />
	</saj:ComplexBizObjListDisplay>		
</swf:DivLayers>	
<saj:NitobiPaginationDisplay ID="bpager" runat="server" ParentBizProcIds="threads" SkinID="Forum" />
</div>
</asp:Content>

